<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
<!--   这种写法为错 <script/>-->
    <script type="text/javascript" src="/Servlet/jquery/jquery-3.4.1.js"></script>
    <script type="text/javascript">
        function fun1() {
            window.alert("AAAA");
            var  param={
                "method":"get",
                "url":"/Servlet/one/test3.do",
                "data": {"userName":$("#one").val()},
                "dataType":"text",
                "success":function(data){

                    $("#one").val(data);
                }

            };
            $.ajax(param);
        }
    </script>
</head>
<body>
<center>

    <input type="text" id="one">
    <input type="button" value="sayHello" onclick="window.fun1()">

</center>
</body>
</html>